

def hanshu(num):
    c=0
    for i in num:
        if type(i) != str:
            print('数据类型不正确')
            return
        elif type(i) == str and i == '':
            print('内容为空')
            return
        else:
            c += 1
    return c


if __name__ == '__main__':

    print(hanshu('1,1,1'))
